package com.vincce.sport.mapper;

import java.util.List;
import java.util.Map;

import com.vincce.sport.core.MyBatisRepository;
import com.vincce.sport.entity.Activity;
import com.vincce.sport.entity.Page;

@MyBatisRepository
public interface ActivityMapper {
	/**
	 * 分页查询活动
	 * @param page
	 * @return
	 */
	public List<Activity> queryActivityByPage(Page<Activity> page);
	/**
	 * 查询活动总数量
	 * @param map
	 * @return
	 */
	public Long queryActivityCount(Map<String, Object> map);
	/**
	 * 添加活动
	 * @param activity
	 * @return
	 */
	public Long insertActivity(Activity activity);
	/**
	 * 修改活动
	 * @param activity
	 * @return
	 */
	public Long updateActivity(Activity activity);
	/**
	 * 根据id删除活动
	 * @param id
	 * @return
	 */
	public Integer deleteById(Integer id);
	/**
	 * 查询所有活动列表
	 * @return
	 */
	public List<Activity> findActivityAll();
	/**
	 * 查询活动唯一性
	 * @param activity
	 * @return
	 */
	public List<Activity> findActivityByOne(Activity activity);
	/**
	 * 根据id查询活动
	 * @param id
	 * @return
	 */
	public Activity findActivityById(Integer id);

}
